package com.xiguaji.tiktok.v1.ins.media.repository;

import com.xiguaji.tiktok.v1.ins.blogger.model.InsBlogger;
import com.xiguaji.tiktok.v1.ins.media.model.InsRelMediaTaggerUser;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface InsRelMediaTaggerUserRepository extends CrudRepository<InsRelMediaTaggerUser,Long> {

    @Query("select b.* from ins_rel_media_tagger_user m inner join ins_blogger b on m.tagger_uid = b.uid where m.shortcode = :shortCode")
    List<InsBlogger> findByShortcode(String shortCode);
}
